<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link href="ElementUI/index.css" rel="stylesheet" >
</head>

<body>

<div id="app">
    <el-pagination
            @current-change="handleCurrentChange"
            :current-page="currentPage"
            :page-size="pageSize"
            layout="total, prev, pager, next, jumper"
            :total="total">

<!--
   @current-change 当前页面改变之后触发的函数：把当前页面传到后端查询最新的数据
    :current-page 默认显示那一页
-->

    </el-pagination>
</div>

<script src="ElementUI/vue.js"></script>
<script src="ElementUI/index.js"></script>
<script>
    new Vue({
        el:"#app",
        data:{
            currentPage:1,
            pageSize:30,
            total:1200,
        },
        methods:{
            handleCurrentChange(currentPage){
                console.log(currentPage);
            }
        },
        created(){

        }
    })
</script>
</body>
</html>
